package main

import "fmt"

func add(a int, b int) int {
	return a + b
}

func sub(a, b int) int {
	return a - b
}

func div(a ...int) int {
	fmt.Printf("%T\n", a)
	sum := 1
	for _, val := range a {
		sum *= val
	}
	return sum
}

func div1(a int, b ...int) int {
	for _, val := range b {
		a *= val
	}
	return a
}

func main() {
	i := add(1, 2)
	fmt.Println(i)

	f := sub(1, 2)
	fmt.Println(f)
	m := div(1, 23, 423424)
	fmt.Println(m)

	n := div1(0, 23, 423424)
	fmt.Println(n)
}
